package com.example.teamilkmall.service.Impl;

import com.example.teamilkmall.entity.PictureInfo;
import com.example.teamilkmall.entity.TeaInfo;
import com.example.teamilkmall.mapper.PictureInfoMapper;
import com.example.teamilkmall.service.PictureInfoServive;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PictureInfoServiceImpl implements PictureInfoServive {
    private final PictureInfoMapper pictureInfoMapper;

    public PictureInfoServiceImpl(PictureInfoMapper pictureInfoMapper) {
        this.pictureInfoMapper = pictureInfoMapper;
    }
    @Override
    public List<PictureInfo> getListPictureInfo() {
        return pictureInfoMapper.getListPictureInfo();
    }

    @Override
    public PageInfo<PictureInfo> listPictureInfo(Integer pageSize, Integer pageNum, String name) {
        return new PageInfo<>(pictureInfoMapper.listPictureInfo(pageSize,pageNum,name));
    }

    @Override
    public void updatePictureInfo(PictureInfo pictureInfo) {
        pictureInfoMapper.updatePictureInfo(pictureInfo);
    }

    @Override
    public void delonePictureInfo(Integer id) {
        pictureInfoMapper.delonePictureInfo(id);
    }

    @Override
    public void addPictureInfo(PictureInfo pictureInfo) {
        pictureInfoMapper.addPictureInfo(pictureInfo);
    }
}
